﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="Tasks.aspx.cs" Inherits="WebSiteTMS.Pages.Tasks" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="stylesheet" href="/Resources/css/tasks.css"/>
    <script type="text/javascript" src="/Resources/js/tasks.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="content">
        <div class="submenu">
          <ul id="sumbmenuUl">
              <li class="item" id="myTasks"><a href="Tasks.aspx?selectedItem=myTasks">My Tasks</a></li>
              <li class="item" id="allTasks"><a href="Tasks.aspx?selectedItem=allTasks">All Tasks</a></li>
              <li class="item" id="doneTasks"><a href="Tasks.aspx?selectedItem=doneTasks">Done Tasks</a></li>
          </ul>
        </div>
        
        <div class="hTxt">Tasks</div>
        
        <% if (Request.Url.AbsoluteUri.Contains("?selectedItem=myTasks") || Request.Url.AbsoluteUri.Contains("?selectedItem=doneTasks"))
           { %>
        <span><b>Select tasks:</b></span>
        <select id="taskSelection">
            <option value="1">All my tasks</option>
            <option value="2">Assigned to me</option>
            <option value="3">Created by me</option>
        </select>
        
        <table cellspacing="0" id="taskTable">
            <tr class="taskTableHeader">
                <th>Number</th>
                <th>Name</th>
                <th>Created by</th>
                <th>Assigned to</th>
                <th>Start date</th>
                <th>Finish date</th>
                <th>Priority</th>
                <th>Status</th>
            </tr>
        </table>

        <% } else if (Request.Url.AbsoluteUri.Contains("?selectedItem=allTasks"))
           {
               if (Request.Cookies["userS"].Value == "Admin")
               { %>

        <span><b>Select tasks:</b></span>
        <select id="goalSelection">
            <option value="1">From All Goals</option>
            <option value="2">From My Goals</option>
        </select>
        <% } %>
        <div id="allTasksInGoals"></div>
        <% }%>

    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
